package cn.ven.mapper;

import cn.ven.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CartMapper {
    public void addCart(Cart cart);//加入购物车
    public void updateCart(@Param("uid")Integer uid,
                           @Param("bookid")Integer bookid);//追加数量
    public Cart findCart(@Param("uid")Integer uid,
                         @Param("bookid")Integer bookid);//查找购物车
    public List<CartBook> findAll(Integer uid);//查找购物车里面的所有的信息
    public void addNewOrder(Order order);//加入到订单
    public void addNewOrditem(ItemBook itemBook);//加入到订单明细里面
    public void delCart(@Param("bookid") Integer bookid,
                        @Param("uid")Integer uid);//根据书本id,以及用户id删除订单
}
